﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AddCadastrosSimples.aspx.cs" Inherits="NewTierra.Pages.Tools.AddCadastrosSimples" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">

    <link rel="shortcut icon" href="../../images/Icones/favicon.ico" type="image/x-icon" />
    <link href="../../Styles/jquery_notification.css" rel="stylesheet" />


    <link href="../../Styles/jquery-ui.css" rel="stylesheet" />    
    <script type="text/javascript" src="../../Scripts/jquery-1.11.0.js"></script>
    <script type="text/javascript" src="../../Scripts/jquery-ui-1.10.0.js"></script>

    <script type="text/javascript" src="../../Scripts/jquery_notification_v.1.js"></script>

    <link href="~/Styles/EstiloGeral.css" rel="stylesheet" type="text/css" />

    <title></title>

    <style type="text/css">
        #Cadastros
        {
            height: auto;
            width: 1330px;
            margin-top: 15px;
            margin-left: 5px;
            margin-right: 5px;
        }

        #tools
        {
            height: 472px;
            padding: 5px;
            width: 1081px;
        }

            #tools .CadBox
            {
                height: 320px;
                float: left;
                width: 556px;
                margin-left: 20px;
                margin-top: 20px;
            }

        .CadBox_form
        {
            width: 584px;
            height: 285px;
        }

            .CadBox_form .CadBox_grid
            {
                width: 301px;
                float: left;
                height: 250px;
                overflow-x: auto;
                overflow-y: auto;
            }

            .CadBox_form .CadBox_formulario
            {
                width: 213px;
                height: 278px;
                float: left;
            }

            .CadBox_form .CadRede_formulario
            {
                width: 280px;
                float: left;
            }

        #FieldSetBox
        {
            width: auto;
            height: auto;
            border-radius: 5px;
        }

        .fieldSetTools
        {
            width: auto;
            height: auto;
            border-radius: 3px;
        }

        .CadBox
        {
            width: 598px;
        }

        .ModalPopupBG
        {
            background-color: gray;
            filter: alpha(opacity=60);
            opacity: 0.7;
        }

        .ModalPopup
        {
            background-color: #ffffdd;
            border-width: 1px;
            border-style: solid;
            border-color: #E6E6E6;
            padding: 3px;
            width: auto;
        }
    </style>

    <script type="text/javascript">

        $(document).ready(function () {

            $("#tabs").tabs();

            $("#tabsTipoServico").tabs();
        });

        function showAutoCloseMessage(MsgsExc) {
            showNotification({
                message: MsgsExc,
                autoClose: true,
                type: "success",
                duration: 5
            });
        }

    </script>

</head>
<body>
    <form id="form1" runat="server">

        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>

        <div class="bgHeader">

            <div class="bgHeader_into">

                <asp:ImageButton ID="ImgVoltarMenu" runat="server" ImageUrl="~/images/Icones/iconeMenu2.png" OnClick="VoltarMenu" ToolTip="Menu" />

            </div>

            <div class="bgHeader_into">

                <asp:Label ID="lblCadastrosHeader" runat="server" Text="Cadastros" CssClass="titulo" />

            </div>

        </div>

        <div id="Cadastros">


            <div id="tabs">
                <ul>
                    <li><a href="#tabs-1">País</a></li>
                    <li><a href="#tabs-2">Cidade</a></li>
                    <li><a href="#tabs-3">Tipo Serviço</a></li>
                    <li><a href="#tabs-4">Mercado</a></li>
                    <li><a href="#tabs-5">Base Tarifária</a></li>
                    <li><a href="#tabs-6">Moeda</a></li>
                    <li><a href="#tabs-7">Redes</a></li>
                    <li><a href="#tabs-8">Temporada</a></li>
                    <li><a href="#tabs-9">Refeições</a></li>
                    <li><a href="#tabs-10">Categoria Apartamento</a></li>
                    <li><a href="#tabs-11">Categoria Hotel</a></li>
                    <li><a href="#tabs-12">Classificação</a></li>
                    <li><a href="#tabs-13">Amenities</a></li>
                </ul>

                <div id="tabs-1">

                    <asp:UpdatePanel ID="UpdatePanelTabPais" runat="server">
                        <ContentTemplate>

                            <div class="CadBox">

                                <fieldset class="fieldSetTools">
                                    <legend>País</legend>

                                    <div class="CadBox_form">

                                        <div class="CadBox_formulario">
                                            <asp:TextBox ID="txtCodigoPais" runat="server" Width="50px" Style="display: none;" ReadOnly="True" />

                                            <p class="paragrafo">
                                                <asp:Label ID="lblPaisNomeTXT" Text="Nome" runat="server" /><br />
                                                <asp:TextBox ID="txtNomePais" runat="server" />
                                                <asp:Image ID="imgNomePaisOk" runat="server" />
                                                <asp:RequiredFieldValidator ID="RqNomePais" runat="server" ControlToValidate="txtNomePais" ErrorMessage="*" ToolTip="Campo Requerido" ValidationGroup="SalvarPais"></asp:RequiredFieldValidator>
                                            </p>
                                            <p class="paragrafo">
                                                <asp:Label ID="lblPaisUFTXT" Text="COD" runat="server" /><br />
                                                <asp:TextBox ID="txtUFPais" runat="server" />
                                            </p>



                                            <asp:Button ID="btnSalvarPais" CssClass="btnGeralAzul" runat="server" Text="Salvar" ValidationGroup="SalvarPais" OnClick="CadastrarPais" />
                                            <asp:Button ID="btnAtualizarPais" CssClass="btnGeralAzul" runat="server" Text="Atualizar" ValidationGroup="SalvarPais" OnClick="AtualizarPais" />
                                            <br />
                                            <asp:Label ID="lblMsgCadPais" Font-Bold="True" runat="server" />

                                        </div>

                                        <div class="CadBox_grid">

                                            <asp:GridView ID="GridCadPais"
                                                GridLines="None" CssClass="mGrid" PagerStyle-CssClass="pgr"
                                                AlternatingRowStyle-CssClass="alt" runat="server"
                                                AutoGenerateColumns="False"
                                                Width="16px" PageSize="8">

                                                <AlternatingRowStyle CssClass="alt"></AlternatingRowStyle>

                                                <Columns>
                                                    <asp:BoundField DataField="PAIS_id" HeaderText="ID" ReadOnly="true" SortExpression="PAIS_id" />
                                                    <asp:BoundField DataField="PAIS_nome" HeaderText="Nome" ReadOnly="true" SortExpression="PAIS_nome">
                                                        <ItemStyle Wrap="False" />
                                                    </asp:BoundField>
                                                    <asp:BoundField DataField="PAIS_uf" HeaderText="Cod" ReadOnly="true" SortExpression="PAIS_uf" />
                                                    <%--<asp:CommandField ButtonType="Image" SelectImageUrl="~/images/Icones/edit.png" ShowSelectButton="True" />--%>


                                                    <asp:TemplateField>
                                                        <ItemTemplate>
                                                            <asp:ImageButton ID="EditarPais"
                                                                runat="server" CommandArgument='<%# Eval("PAIS_id") %>'
                                                                OnCommand="EditarPais"
                                                                ToolTip="Editar País" ImageUrl="~/images/Icones/edit.png" />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>

                                                    <asp:TemplateField HeaderText="">
                                                        <ItemTemplate>
                                                            <asp:ImageButton ID="ExluirPais"
                                                                runat="server" CommandArgument='<%# Eval("PAIS_id") %>'
                                                                OnCommand="ExcluirPais"
                                                                ToolTip="Excluir País" ImageUrl="~/images/Icones/delete.png" />
                                                        </ItemTemplate>
                                                        <HeaderStyle Wrap="False" />
                                                        <ItemStyle Wrap="False" />
                                                    </asp:TemplateField>

                                                </Columns>

                                                <PagerStyle CssClass="pgr"></PagerStyle>

                                            </asp:GridView>

                                        </div>

                                    </div>

                                </fieldset>

                            </div>

                        </ContentTemplate>
                    </asp:UpdatePanel>

                </div>

                <div id="tabs-2">

                    <asp:UpdatePanel ID="UpdatePanelTabCidade" runat="server">
                        <ContentTemplate>

                            <div class="CadBox">
                                <fieldset class="fieldSetTools">
                                    <legend>Cidade</legend>

                                    <div class="CadBox_form">

                                        <div class="CadRede_formulario">

                                            <asp:TextBox ID="txtCodigoCidade" runat="server" Width="50px" Style="display: none;" ReadOnly="True" />

                                            <p class="paragrafo">
                                                <asp:Label ID="lblCidadeNomeTXT" Text="Nome" runat="server" /><br />
                                                <asp:TextBox ID="txtNomeCidade" runat="server" AutoPostBack="true" OnTextChanged="txtNomeCidade_TextChanged" />
                                                <asp:Image ID="imgCidadeOk" runat="server" />
                                                <asp:RequiredFieldValidator ID="RqNomeCidade" runat="server" ControlToValidate="txtNomeCidade" ErrorMessage="*" ToolTip="Campo Requerido" ValidationGroup="SalvarCidade" Enabled="true"></asp:RequiredFieldValidator>
                                            </p>
                                            <p class="paragrafo">
                                                <asp:Label ID="lblCidadeIataTXT" Text="Iata" runat="server" /><br />
                                                <asp:TextBox ID="txtCodIata" runat="server" />
                                                <%--<asp:RequiredFieldValidator ID="RqCodIataCidade" runat="server" ControlToValidate="txtCodIata" ErrorMessage="*" ToolTip="Campo Requerido" ValidationGroup="SalvarCidade"></asp:RequiredFieldValidator>--%>
                                            </p>
                                            <p class="paragrafo">
                                                <asp:Label ID="lblCidadeUF" Text="UF" runat="server" /><br />
                                                <asp:TextBox ID="txtCidadeUF" runat="server" />
                                                <%--<asp:RequiredFieldValidator ID="RqUFCidade" runat="server" ControlToValidate="txtCidadeUF" ErrorMessage="*" ToolTip="Campo Requerido" ValidationGroup="SalvarCidade"></asp:RequiredFieldValidator>--%>
                                            </p>
                                            <p class="paragrafo">
                                                <asp:Label ID="lblNomePaisCidadeTXT" Text="Pais" runat="server" /><br />
                                                <asp:DropDownList ID="ddlPaisCidade" runat="server" Width="100px">
                                                </asp:DropDownList>
                                            </p>

                                            <p class="paragrafo">
                                                <asp:Label ID="lblObsTarifario" Text="Obs Tarifário" runat="server" /><br />
                                                <asp:TextBox ID="txtObsTarifario" runat="server" TextMode="MultiLine"  />
                                            </p>

                                            <asp:Button ID="btnSalvarCidade" CssClass="btnGeralAzul" runat="server" Text="Salvar" ValidationGroup="SalvarCidade" OnClick="CadastrarCidade" />
                                            <asp:Button ID="btnAtualizarCidade" CssClass="btnGeralAzul" runat="server" Text="Atualizar" ValidationGroup="SalvarCidade" OnClick="AtualizarCidade" />
                                            <br />
                                            <asp:Label ID="lblMsgCadCidade" Font-Bold="True" Text="" runat="server" />

                                        </div>

                                        <div class="CadBox_grid">

                                            <asp:GridView ID="GridCadCidade"
                                                GridLines="None" CssClass="mGrid" PagerStyle-CssClass="pgr"
                                                AlternatingRowStyle-CssClass="alt" runat="server"
                                                AutoGenerateColumns="False"
                                                PageSize="8">
                                                <AlternatingRowStyle CssClass="alt" />
                                                <Columns>

                                                    <asp:BoundField DataField="CID_id" HeaderText="ID" ReadOnly="True" SortExpression="CID_id" />
                                                    <asp:BoundField DataField="CID_cod_Iata" HeaderText="Iata" SortExpression="CID_cod_Iata" />
                                                    <asp:BoundField DataField="CID_nome" HeaderText="Nome" SortExpression="CID_nome" />
                                                    <asp:BoundField DataField="CID_uf" HeaderText="UF" SortExpression="CID_uf" />

                                                    <%--<asp:CommandField ButtonType="Image" SelectImageUrl="~/images/Icones/edit.png" ShowSelectButton="True" />--%>

                                                    <asp:TemplateField>
                                                        <ItemTemplate>
                                                            <asp:ImageButton ID="EditarCidade"
                                                                runat="server" CommandArgument='<%# Eval("CID_id") %>'
                                                                OnCommand="EditarCidade"
                                                                ToolTip="Editar Cidade" ImageUrl="~/images/Icones/edit.png" />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>

                                                    <asp:TemplateField HeaderText="">
                                                        <ItemTemplate>
                                                            <asp:ImageButton ID="ExluirCidade"
                                                                runat="server" CommandArgument='<%# Eval("CID_id") %>'
                                                                OnCommand="ExcluirCidade"
                                                                ToolTip="Excluir Cidade" ImageUrl="~/images/Icones/delete.png" />
                                                        </ItemTemplate>
                                                        <HeaderStyle Wrap="False" />
                                                        <ItemStyle Wrap="False" />
                                                    </asp:TemplateField>

                                                </Columns>
                                                <PagerStyle CssClass="pgr" />
                                            </asp:GridView>


                                        </div>

                                    </div>

                                </fieldset>

                            </div>

                        </ContentTemplate>
                    </asp:UpdatePanel>

                </div>

                <div id="tabs-3">

                    <div id="tabsTipoServico">
                        <ul>
                            <li><a href="#tabsTipoServico-1">Tipo Serviço</a></li>
                            <li><a href="#tabsTipoServico-2">Categoria</a></li>
                            <li><a href="#tabsTipoServico-3">Sub Tipo - SubServiço</a></li>
                            <li><a href="#tabsTipoServico-4">Item - SubServiço</a></li>
                        </ul>

                        <div id="tabsTipoServico-1">

                            <asp:UpdatePanel ID="UpdatePanelTabTipoServ" runat="server">
                                <ContentTemplate>

                                    <div class="CadBox">

                                        <div class="CadBox_form">

                                            <div class="CadBox_formulario">

                                                <asp:TextBox ID="txtCodTipoServ" runat="server" Width="50px" Style="display: none;" ReadOnly="True" />

                                                <p class="paragrafo">
                                                    <asp:Label ID="lblTipoServNomeTXT" Text="Nome" runat="server" /><br />
                                                    <asp:TextBox ID="txtNomeTipoServ" runat="server" AutoPostBack="true" OnTextChanged="txtNomeTipoServ_TextChanged" />
                                                    <asp:Image ID="imgNomeTipoServOk" runat="server" />
                                                    <asp:RequiredFieldValidator ID="RqTipoServ" runat="server" ControlToValidate="txtNomeTipoServ" ErrorMessage="*" ToolTip="Campo Requerido" ValidationGroup="SalvarTipoServ"></asp:RequiredFieldValidator>
                                                </p>

                                                <asp:Button ID="btnSalvarTipoServ" CssClass="btnGeralAzul" runat="server" Text="Salvar" ValidationGroup="SalvarTipoServ" OnClick="CadastrarTipoServ" />
                                                <asp:Button ID="btnAtualizarTipoServ" CssClass="btnGeralAzul" runat="server" Text="Atualizar" ValidationGroup="SalvarTipoServ" OnClick="AtualizarTipoServ" />
                                                <br />
                                                <asp:Label ID="lblMsgCadTipoServ" Font-Bold="True" runat="server" />


                                            </div>

                                            <div class="CadBox_grid">

                                                <asp:GridView ID="GridTipoServ"
                                                    GridLines="None" CssClass="mGrid" PagerStyle-CssClass="pgr"
                                                    AlternatingRowStyle-CssClass="alt" runat="server"
                                                    AutoGenerateColumns="False"
                                                    PageSize="8">
                                                    <AlternatingRowStyle CssClass="alt" />
                                                    <Columns>
                                                        <asp:BoundField DataField="Tipo_Id" HeaderText="ID" ReadOnly="True" SortExpression="Tipo_Id" />
                                                        <asp:BoundField DataField="Tipo_Nome" HeaderText="Nome" SortExpression="Tipo_Nome" />

                                                        <asp:TemplateField>
                                                            <ItemTemplate>
                                                                <asp:ImageButton ID="EditarTipoServ"
                                                                    runat="server" CommandArgument='<%# Eval("Tipo_Id") %>'
                                                                    OnCommand="EditarTipoServ"
                                                                    ToolTip="Editar Tipo Serviço" ImageUrl="~/images/Icones/edit.png" />
                                                            </ItemTemplate>
                                                        </asp:TemplateField>

                                                        <asp:TemplateField HeaderText="">
                                                            <ItemTemplate>
                                                                <asp:ImageButton ID="ExluirTipoServ"
                                                                    runat="server" CommandArgument='<%# Eval("Tipo_Id") %>'
                                                                    OnCommand="ExcluirTipoServ"
                                                                    ToolTip="Excluir Tipo Serviço" ImageUrl="~/images/Icones/delete.png" />
                                                            </ItemTemplate>
                                                            <HeaderStyle Wrap="False" />
                                                            <ItemStyle Wrap="False" />
                                                        </asp:TemplateField>

                                                    </Columns>
                                                    <PagerStyle CssClass="pgr" />
                                                </asp:GridView>

                                            </div>

                                        </div>

                                    </div>

                                </ContentTemplate>
                            </asp:UpdatePanel>

                        </div>

                        <div id="tabsTipoServico-2">

                            <asp:UpdatePanel ID="UpdatePanelTabTipoServCateg" runat="server">
                                <ContentTemplate>

                                    <div class="CadBox">

                                        <div class="CadBox_form">

                                            <div class="CadBox_formulario">

                                                <asp:TextBox ID="txtCodTipoServCateg" runat="server" Width="50px" Style="display: none;" ReadOnly="True" />

                                                <p class="paragrafo">
                                                    <asp:Label ID="lblTipoServNomeCategTXT" Text="Nome" runat="server" /><br />
                                                    <asp:TextBox ID="txtNomeTipoServCateg" runat="server" AutoPostBack="true" OnTextChanged="txtNomeTipoServCateg_TextChanged" />
                                                    <asp:Image ID="imgNomeTipoServCategOk" runat="server" />
                                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtNomeTipoServCateg" ErrorMessage="*" ToolTip="Campo Requerido" ValidationGroup="SalvarTipoServCateg"></asp:RequiredFieldValidator>
                                                </p>

                                                <p class="paragrafo">
                                                    <asp:Label ID="lblTipoServCategTXT" Text="Tipo Serviço" runat="server" /><br />
                                                    <asp:DropDownList ID="ddlTipoServ" runat="server" />
                                                </p>

                                                <asp:Button ID="btnSalvarTipoServCateg" CssClass="btnGeralAzul" runat="server" Text="Salvar" ValidationGroup="SalvarTipoServCateg" OnClick="CadastrarTipoServCateg" />
                                                <asp:Button ID="btnAtualizarTipoServCateg" CssClass="btnGeralAzul" runat="server" Text="Atualizar" ValidationGroup="SalvarTipoServCateg" OnClick="AtualizarTipoServCateg" />
                                                <br />
                                                <asp:Label ID="lblMsgCadTipoServCateg" Font-Bold="True" runat="server" />

                                            </div>

                                            <div class="CadBox_grid">

                                                <asp:GridView ID="GridTipoServCateg"
                                                    GridLines="None" CssClass="mGrid" PagerStyle-CssClass="pgr"
                                                    AlternatingRowStyle-CssClass="alt" runat="server"
                                                    AutoGenerateColumns="False" PageSize="8">
                                                    <AlternatingRowStyle CssClass="alt" />
                                                    <Columns>
                                                        <asp:BoundField DataField="Tipo_categ_id" HeaderText="ID" ReadOnly="True" SortExpression="Tipo_categ_id" />
                                                        <asp:BoundField DataField="Tipo_categ_nome" HeaderText="Nome" SortExpression="Tipo_categ_nome" />

                                                        <asp:TemplateField>
                                                            <ItemTemplate>
                                                                <asp:ImageButton ID="EditarTipoServCateg"
                                                                    runat="server" CommandArgument='<%# Eval("Tipo_categ_id") %>'
                                                                    OnCommand="EditarTipoServCateg"
                                                                    ToolTip="Editar Categoria" ImageUrl="~/images/Icones/edit.png" />
                                                            </ItemTemplate>
                                                        </asp:TemplateField>

                                                        <asp:TemplateField HeaderText="">
                                                            <ItemTemplate>
                                                                <asp:ImageButton ID="ExluirTipoServCateg"
                                                                    runat="server" CommandArgument='<%# Eval("Tipo_categ_id") %>'
                                                                    OnCommand="ExluirTipoServCateg"
                                                                    ToolTip="Excluir Categoria" ImageUrl="~/images/Icones/delete.png" />
                                                            </ItemTemplate>
                                                            <HeaderStyle Wrap="False" />
                                                            <ItemStyle Wrap="False" />
                                                        </asp:TemplateField>

                                                    </Columns>
                                                    <PagerStyle CssClass="pgr" />
                                                </asp:GridView>

                                            </div>

                                        </div>
                                    </div>

                                </ContentTemplate>
                            </asp:UpdatePanel>

                        </div>

                         <div id="tabsTipoServico-3">

                            <asp:UpdatePanel ID="UpdatePanelTabSubTipoSubServico" runat="server">
                                <ContentTemplate>

                                    <div class="CadBox">

                                        <div class="CadBox_form">

                                            <div class="CadBox_formulario">

                                                <asp:TextBox ID="txtCodSubItem" runat="server" Width="50px" Style="display: none;" ReadOnly="True" />

                                                <p class="paragrafo">
                                                    <asp:Label ID="lblSubItemNome" Text="Nome" runat="server" /><br />
                                                    <asp:TextBox ID="txtNomeSubItem" runat="server" />                                                    
                                                    <asp:RequiredFieldValidator ID="RqNomeSubItem" runat="server" ControlToValidate="txtNomeSubItem" ErrorMessage="*" ToolTip="Campo Requerido" ValidationGroup="SalvarSubItem"></asp:RequiredFieldValidator>
                                                </p>

                                                <asp:Button ID="btnSalvarSubItem" CssClass="btnGeralAzul" runat="server" Text="Salvar" ValidationGroup="SalvarSubItem" OnClick="CadastrarSubItem" />
                                                <asp:Button ID="btnAtualizarSubItem" CssClass="btnGeralAzul" runat="server" Text="Atualizar" ValidationGroup="SalvarSubItem" OnClick="AtualizarSubItem" />
                                                <br />
                                                <asp:Label ID="lblMsgCadastroSubItem" Font-Bold="True" runat="server" />


                                            </div>

                                            <div class="CadBox_grid">

                                                <asp:GridView ID="GridSubItem"
                                                    GridLines="None" CssClass="mGrid" PagerStyle-CssClass="pgr"
                                                    AlternatingRowStyle-CssClass="alt" runat="server"
                                                    AutoGenerateColumns="False" PageSize="8">
                                                    <AlternatingRowStyle CssClass="alt" />
                                                    <Columns>
                                                        <asp:BoundField DataField="SubItem_id" HeaderText="ID" ReadOnly="True" SortExpression="SubItem_id" />
                                                        <asp:BoundField DataField="SubItem_nome" HeaderText="Nome" SortExpression="SubItem_nome" />

                                                        <asp:TemplateField>
                                                            <ItemTemplate>
                                                                <asp:ImageButton ID="EditarSubItem"
                                                                    runat="server" CommandArgument='<%# Eval("SubItem_id") %>'
                                                                    OnCommand="EditarSubItem"
                                                                    ToolTip="Editar Sub Item SubServiço" ImageUrl="~/images/Icones/edit.png" />
                                                            </ItemTemplate>
                                                        </asp:TemplateField>

                                                        <asp:TemplateField HeaderText="">
                                                            <ItemTemplate>
                                                                <asp:ImageButton ID="ExluirSubItem"
                                                                    runat="server" CommandArgument='<%# Eval("SubItem_id") %>'
                                                                    OnCommand="ExluirSubItem"
                                                                    ToolTip="Excluir Sub Item" ImageUrl="~/images/Icones/delete.png" />
                                                            </ItemTemplate>
                                                            <HeaderStyle Wrap="False" />
                                                            <ItemStyle Wrap="False" />
                                                        </asp:TemplateField>

                                                    </Columns>
                                                    <PagerStyle CssClass="pgr" />
                                                </asp:GridView>

                                            </div>

                                        </div>
                                    </div>

                                </ContentTemplate>
                            </asp:UpdatePanel>

                        </div>

                        <div id="tabsTipoServico-4">

                            <asp:UpdatePanel ID="UpdatePanelTabItemSubServico" runat="server">
                                <ContentTemplate>

                                    <div class="CadBox">

                                        <div class="CadBox_form">

                                            <div class="CadBox_formulario">

                                                <asp:TextBox ID="txtCodItemSubServico" runat="server" Width="50px" Style="display: none;" ReadOnly="True" />

                                                <p class="paragrafo">
                                                    <asp:Label ID="lblNomeItemSubServico" Text="Nome" runat="server" /><br />
                                                    <asp:TextBox ID="txtNomeItemSubServico" runat="server" AutoPostBack="true" OnTextChanged="txtNomeItemSubServico_TextChanged" />
                                                    <asp:Image ID="imgNomeItemSubServicoOk" runat="server" />
                                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtNomeItemSubServico" ErrorMessage="*" ToolTip="Campo Requerido" ValidationGroup="SalvarItemSubServico"></asp:RequiredFieldValidator>
                                                </p>

                                                <asp:Button ID="btnSalvarItemSubServico" CssClass="btnGeralAzul" runat="server" Text="Salvar" ValidationGroup="SalvarItemSubServico" OnClick="CadastrarItemSubServico" />
                                                <asp:Button ID="btnAtualizarItemSubServico" CssClass="btnGeralAzul" runat="server" Text="Atualizar" ValidationGroup="SalvarItemSubServico" OnClick="AtualizarItemSubServico" />
                                                <br />
                                                <asp:Label ID="lblMsgCadItemSubServico" Font-Bold="True" runat="server" />


                                            </div>

                                            <div class="CadBox_grid">

                                                <asp:GridView ID="GridItemSubServico"
                                                    GridLines="None" CssClass="mGrid" PagerStyle-CssClass="pgr"
                                                    AlternatingRowStyle-CssClass="alt" runat="server"
                                                    AutoGenerateColumns="False" PageSize="8">
                                                    <AlternatingRowStyle CssClass="alt" />
                                                    <Columns>
                                                        <asp:BoundField DataField="ItemSubServico_id" HeaderText="ID" ReadOnly="True" SortExpression="ItemSubServico_id" />
                                                        <asp:BoundField DataField="ItemSubServico_nome" HeaderText="Nome" SortExpression="ItemSubServico_nome" />

                                                        <asp:TemplateField>
                                                            <ItemTemplate>
                                                                <asp:ImageButton ID="EditarItemSubServico"
                                                                    runat="server" CommandArgument='<%# Eval("ItemSubServico_id") %>'
                                                                    OnCommand="EditarItemSubServico"
                                                                    ToolTip="Editar Item SubServiço" ImageUrl="~/images/Icones/edit.png" />
                                                            </ItemTemplate>
                                                        </asp:TemplateField>

                                                        <asp:TemplateField HeaderText="">
                                                            <ItemTemplate>
                                                                <asp:ImageButton ID="ExluirItemSubServico"
                                                                    runat="server" CommandArgument='<%# Eval("ItemSubServico_id") %>'
                                                                    OnCommand="ExluirItemSubServico"
                                                                    ToolTip="Excluir Item SubServiço" ImageUrl="~/images/Icones/delete.png" />
                                                            </ItemTemplate>
                                                            <HeaderStyle Wrap="False" />
                                                            <ItemStyle Wrap="False" />
                                                        </asp:TemplateField>

                                                    </Columns>
                                                    <PagerStyle CssClass="pgr" />
                                                </asp:GridView>

                                            </div>

                                        </div>
                                    </div>

                                </ContentTemplate>
                            </asp:UpdatePanel>

                        </div>



                    </div>

                </div>

                <div id="tabs-4">

                    <asp:UpdatePanel ID="UpdatePanelTabMercado" runat="server">
                        <ContentTemplate>

                            <div class="CadBox">
                                <fieldset class="fieldSetTools">
                                    <legend>Mercado</legend>

                                    <div class="CadBox_form">

                                        <div class="CadBox_formulario">

                                            <asp:TextBox ID="txtCodigoMercado" runat="server" Width="50px" Style="display: none;" ReadOnly="True" />

                                            <p class="paragrafo">
                                                <asp:Label ID="lblNomeMercadoTXT" Text="Nome" runat="server" /><br />
                                                <asp:TextBox ID="txtNomeMercado" runat="server" AutoPostBack="true" OnTextChanged="txtNomeMercado_TextChanged" />
                                                <asp:Image ID="imgNomeMercadoOk" runat="server" />
                                                <asp:RequiredFieldValidator ID="RqNomeMercado" runat="server" ControlToValidate="txtNomeMercado" ErrorMessage="*" ToolTip="Campo Requerido" ValidationGroup="SalvarMercado"></asp:RequiredFieldValidator>
                                            </p>

                                            <asp:Button ID="btnSalvarMercado" CssClass="btnGeralAzul" runat="server" Text="Salvar" ValidationGroup="SalvarMercado" OnClick="CadastrarMercado" />
                                            <asp:Button ID="btnAtualizarMercado" CssClass="btnGeralAzul" runat="server" Text="Atualizar" ValidationGroup="SalvarMercado" OnClick="AtualizarMercado" />
                                            <br />
                                            <asp:Label ID="lblMsgCadMercado" Font-Bold="True" Text="" runat="server" />
                                        </div>

                                        <div class="CadBox_Grid">

                                            <asp:GridView ID="GridMercado"
                                                GridLines="None" CssClass="mGrid" PagerStyle-CssClass="pgr"
                                                AlternatingRowStyle-CssClass="alt" runat="server"
                                                AutoGenerateColumns="False"
                                                Width="16px"
                                                PageSize="8">
                                                <AlternatingRowStyle CssClass="alt"></AlternatingRowStyle>
                                                <Columns>

                                                    <asp:BoundField DataField="Mercado_id" HeaderText="ID" ReadOnly="True" SortExpression="Mercado_id" />

                                                    <asp:BoundField DataField="Mercado_nome" HeaderText="Nome" SortExpression="Mercado_nome" />

                                                    <%--<asp:CommandField ButtonType="Image" SelectImageUrl="~/images/Icones/edit.png" ShowSelectButton="True" />--%>

                                                    <asp:TemplateField>
                                                        <ItemTemplate>
                                                            <asp:ImageButton ID="EditarMercado"
                                                                runat="server" CommandArgument='<%# Eval("Mercado_id") %>'
                                                                OnCommand="EditarMercado"
                                                                ToolTip="Editar Mercado" ImageUrl="~/images/Icones/edit.png" />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>

                                                    <asp:TemplateField HeaderText="">
                                                        <ItemTemplate>
                                                            <asp:ImageButton ID="ExcluirMercado"
                                                                runat="server" CommandArgument='<%# Eval("Mercado_id") %>'
                                                                OnCommand="ExcluirMercado"
                                                                ToolTip="Excluir Mercado" ImageUrl="~/images/Icones/delete.png" />
                                                        </ItemTemplate>
                                                        <HeaderStyle Wrap="False" />
                                                        <ItemStyle Wrap="False" />
                                                    </asp:TemplateField>

                                                </Columns>

                                                <PagerStyle CssClass="pgr"></PagerStyle>

                                            </asp:GridView>

                                        </div>

                                    </div>


                                </fieldset>

                            </div>

                        </ContentTemplate>
                    </asp:UpdatePanel>

                </div>

                <div id="tabs-5">

                    <asp:UpdatePanel ID="UpdatePanelTabBaseTarifaria" runat="server">
                        <ContentTemplate>

                            <div class="CadBox">
                                <fieldset class="fieldSetTools">
                                    <legend>Base Tarifária</legend>

                                    <div class="CadBox_form">

                                        <div class="CadBox_formulario">

                                            <asp:TextBox ID="txtCodigoBaseTarifaria" runat="server" Width="50px" Style="display: none;" ReadOnly="True" />

                                            <p class="paragrafo">
                                                <asp:Label ID="lblNomeBaseTarifariaTXT" Text="Nome" runat="server" /><br />
                                                <asp:TextBox ID="txtNomeBaseTarifaria" runat="server" AutoPostBack="true" OnTextChanged="txtNomeBaseTarifaria_TextChanged" />
                                                <asp:Image ID="imgNomeBaseTarifariaOk" runat="server" />
                                                <asp:RequiredFieldValidator ID="RqNomeBaseTarifaria" runat="server" ControlToValidate="txtNomeBaseTarifaria" ErrorMessage="*" ToolTip="Campo Requerido" ValidationGroup="SalvarBaseTarifaria"></asp:RequiredFieldValidator>
                                            </p>

                                            <asp:Button ID="btnSalvarBaseTarifaria" CssClass="btnGeralAzul" runat="server" Text="Salvar" ValidationGroup="SalvarBaseTarifaria" OnClick="CadastrarBaseTarifaria" />
                                            <asp:Button ID="btnAtualizarBaseTarifaria" CssClass="btnGeralAzul" runat="server" Text="Atualizar" ValidationGroup="SalvarBaseTarifaria" OnClick="AtualizarBaseTarifaria" />
                                            <br />
                                            <asp:Label ID="lblMsgCadBaseTarifaria" Font-Bold="True" Text="" runat="server" />

                                        </div>

                                        <div class="CadBox_Grid">

                                            <asp:GridView ID="GridBaseTarifaria"
                                                GridLines="None" CssClass="mGrid" PagerStyle-CssClass="pgr"
                                                AlternatingRowStyle-CssClass="alt" runat="server"
                                                AutoGenerateColumns="False"
                                                Width="16px"
                                                PageSize="8">
                                                <AlternatingRowStyle CssClass="alt"></AlternatingRowStyle>
                                                <Columns>

                                                    <asp:BoundField DataField="BaseTarifaria_id" HeaderText="ID" ReadOnly="True" SortExpression="BaseTarifaria_id" />

                                                    <asp:BoundField DataField="BaseTarifaria_nome" HeaderText="Nome" SortExpression="BaseTarifaria_nome" />

                                                    <%--<asp:CommandField ButtonType="Image" SelectImageUrl="~/images/Icones/edit.png" ShowSelectButton="True" />--%>

                                                    <asp:TemplateField>
                                                        <ItemTemplate>
                                                            <asp:ImageButton ID="EditarBaseTarifaria"
                                                                runat="server" CommandArgument='<%# Eval("BaseTarifaria_id") %>'
                                                                OnCommand="EditarBaseTarifaria"
                                                                ToolTip="Editar Base Tarifaria" ImageUrl="~/images/Icones/edit.png" />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>

                                                    <asp:TemplateField HeaderText="">
                                                        <ItemTemplate>
                                                            <asp:ImageButton ID="ExcluirBaseTarifaria"
                                                                runat="server" CommandArgument='<%# Eval("BaseTarifaria_id") %>'
                                                                OnCommand="ExcluirBaseTarifaria"
                                                                ToolTip="Excluir Base Tarifária" ImageUrl="~/images/Icones/delete.png" />
                                                        </ItemTemplate>
                                                        <HeaderStyle Wrap="False" />
                                                        <ItemStyle Wrap="False" />
                                                    </asp:TemplateField>

                                                </Columns>

                                                <PagerStyle CssClass="pgr"></PagerStyle>

                                            </asp:GridView>


                                        </div>

                                    </div>

                                </fieldset>

                            </div>

                        </ContentTemplate>
                    </asp:UpdatePanel>

                </div>

                <div id="tabs-6">

                    <asp:UpdatePanel ID="UpdatePanelTabMoeda" runat="server">
                        <ContentTemplate>

                            <div class="CadBox">
                                <fieldset class="fieldSetTools">
                                    <legend>Moeda</legend>

                                    <div class="CadBox_form">

                                        <div class="CadBox_formulario">

                                            <asp:TextBox ID="txtCodigoMoeda" runat="server" Width="50px" Style="display: none;" ReadOnly="True" />

                                            <p class="paragrafo">
                                                <asp:Label ID="lblNomeMoedaTXT" Text="Nome" runat="server" /><br />
                                                <asp:TextBox ID="txtNomeMoeda" runat="server" AutoPostBack="true" OnTextChanged="txtNomeMoeda_TextChanged" />
                                                <asp:Image ID="imgNomeMoedaOk" runat="server" />
                                                <asp:RequiredFieldValidator ID="RqMoeda" runat="server" ControlToValidate="txtNomeMoeda" ErrorMessage="*" ToolTip="Campo Requerido" ValidationGroup="SalvarMoeda"></asp:RequiredFieldValidator>
                                            </p>

                                            <p class="paragrafo">
                                                <asp:Label ID="lblSiglaMoedaTXT" Text="Sigla" runat="server" /><br />
                                                <asp:TextBox ID="txtSiglaMoeda" runat="server" />
                                                <asp:RequiredFieldValidator ID="RqSigla" runat="server" ControlToValidate="txtSiglaMoeda" ErrorMessage="*" ToolTip="Campo Requerido" ValidationGroup="SalvarMoeda"></asp:RequiredFieldValidator>
                                            </p>

                                            <asp:Button ID="btnSalvarMoeda" CssClass="btnGeralAzul" runat="server" Text="Salvar" ValidationGroup="SalvarMoeda" OnClick="CadastrarMoeda" />
                                            <asp:Button ID="btnAtualizarMoeda" CssClass="btnGeralAzul" runat="server" Text="Atualizar" ValidationGroup="SalvarMoeda" OnClick="AtualizarMoeda" />
                                            <br />
                                            <asp:Label ID="lblMsgCadMoeda" Font-Bold="True" Text="" runat="server" />

                                        </div>

                                        <div class="CadBox_Grid">

                                            <asp:GridView ID="GridMoeda"
                                                GridLines="None" CssClass="mGrid" PagerStyle-CssClass="pgr"
                                                AlternatingRowStyle-CssClass="alt" runat="server"
                                                AutoGenerateColumns="False"
                                                Width="16px"
                                                PageSize="8">
                                                <AlternatingRowStyle CssClass="alt"></AlternatingRowStyle>
                                                <Columns>

                                                    <asp:BoundField DataField="Moeda_id" HeaderText="ID" ReadOnly="True" SortExpression="Moeda_id" />

                                                    <asp:BoundField DataField="Moeda_sigla" HeaderText="Sigla" SortExpression="Moeda_sigla" />

                                                    <asp:BoundField DataField="Moeda_nome" HeaderText="Nome" SortExpression="Moeda_nome" />

                                                    <%--<asp:CommandField ButtonType="Image" SelectImageUrl="~/images/Icones/edit.png" ShowSelectButton="True" />--%>

                                                    <asp:TemplateField>
                                                        <ItemTemplate>
                                                            <asp:ImageButton ID="EditarMoeda"
                                                                runat="server" CommandArgument='<%# Eval("Moeda_id") %>'
                                                                OnCommand="EditarMoeda"
                                                                ToolTip="Editar Moeda" ImageUrl="~/images/Icones/edit.png" />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>

                                                    <asp:TemplateField HeaderText="">
                                                        <ItemTemplate>
                                                            <asp:ImageButton ID="ExcluirMoeda"
                                                                runat="server" CommandArgument='<%# Eval("Moeda_id") %>'
                                                                OnCommand="ExcluirMoeda"
                                                                ToolTip="Excluir Moeda" ImageUrl="~/images/Icones/delete.png" />
                                                        </ItemTemplate>
                                                        <HeaderStyle Wrap="False" />
                                                        <ItemStyle Wrap="False" />
                                                    </asp:TemplateField>

                                                </Columns>

                                                <PagerStyle CssClass="pgr"></PagerStyle>

                                            </asp:GridView>

                                        </div>

                                    </div>


                                </fieldset>

                            </div>

                        </ContentTemplate>
                    </asp:UpdatePanel>

                </div>

                <div id="tabs-7">

                    <asp:UpdatePanel ID="UpdatePanelTabRede" runat="server">
                        <ContentTemplate>

                            <div class="CadBox">
                                <fieldset class="fieldSetTools">
                                    <legend>Redes</legend>

                                    <div class="CadBox_form">

                                        <div class="CadRede_formulario">

                                            <asp:TextBox ID="txtCodigoRedes" runat="server" Width="50px" Style="display: none;" ReadOnly="True" />

                                            <p class="paragrafo">
                                                <asp:Label ID="lblNomeRedeTXT" Text="Nome" runat="server" /><br />
                                                <asp:TextBox ID="txtNomeRede" runat="server" AutoPostBack="true" OnTextChanged="txtNomeRede_TextChanged" />
                                                <asp:Image ID="imgNomeRedeOk" runat="server" />
                                                <asp:RequiredFieldValidator ID="RqNomeRede" runat="server" ControlToValidate="txtNomeRede" ErrorMessage="*" ToolTip="Campo Requerido" ValidationGroup="SalvarRede"></asp:RequiredFieldValidator>
                                            </p>

                                            <p class="paragrafo">
                                                <asp:Label ID="lblEnderecoRedeTXT" Text="Endereço" runat="server" /><br />
                                                <asp:TextBox ID="txtEnderecoRede" runat="server" MaxLength="50" Width="250px" />
                                            </p>

                                            <p class="paragrafo">
                                                <asp:Label ID="lblCnpjRede" Text="Cnpj" runat="server" /><br />
                                                <asp:TextBox ID="txtCnpjRede" runat="server" MaxLength="20" Width="200px" />
                                            </p>

                                            <p class="paragrafo">
                                                <asp:Label ID="lblTelefoneRede" Text="Telefone" runat="server" /><br />
                                                <asp:TextBox ID="txtTelefoneRede" runat="server" MaxLength="15" />
                                            </p>

                                            <p class="paragrafo">
                                                <asp:Label ID="lblEmailRede" Text="Email" runat="server" /><br />
                                                <asp:TextBox ID="txtEmailRede" runat="server" MaxLength="50" Width="200px" />
                                                <asp:RegularExpressionValidator ID="ReEmail" runat="server" ErrorMessage="*" ValidationGroup="SalvarRede" ControlToValidate="txtEmailRede" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" ToolTip="Email inválido."></asp:RegularExpressionValidator>
                                            </p>

                                            <asp:Button ID="btnSalvarRede" CssClass="btnGeralAzul" runat="server" Text="Salvar" ValidationGroup="SalvarRede" OnClick="CadastrarRede" />
                                            <asp:Button ID="btnAtualizarRede" CssClass="btnGeralAzul" runat="server" Text="Atualizar" ValidationGroup="SalvarRede" OnClick="AtualizarRede" />
                                            <br />
                                            <asp:Label ID="lblMsgCadRedes" Font-Bold="True" runat="server" />



                                        </div>

                                        <div class="CadBox_grid">

                                            <asp:GridView ID="GridRedes"
                                                GridLines="None" CssClass="mGrid" PagerStyle-CssClass="pgr"
                                                AlternatingRowStyle-CssClass="alt" runat="server"
                                                AutoGenerateColumns="False"
                                                Width="196px"
                                                PageSize="8">
                                                <AlternatingRowStyle CssClass="alt"></AlternatingRowStyle>
                                                <Columns>

                                                    <asp:BoundField DataField="Rede_id" HeaderText="ID" ReadOnly="True" SortExpression="Rede_id" />

                                                    <asp:BoundField DataField="Rede_nome" HeaderText="Sigla" SortExpression="Rede_nome" />

                                                    <%--<asp:CommandField ButtonType="Image" SelectImageUrl="~/images/Icones/edit.png" ShowSelectButton="True" />--%>

                                                    <asp:TemplateField>
                                                        <ItemTemplate>
                                                            <asp:ImageButton ID="EditaRedes"
                                                                runat="server" CommandArgument='<%# Eval("Rede_id") %>'
                                                                OnCommand="EditaRedes"
                                                                ToolTip="Editar Redes" ImageUrl="~/images/Icones/edit.png" />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>

                                                    <asp:TemplateField HeaderText="">
                                                        <ItemTemplate>
                                                            <asp:ImageButton ID="ExcluirRede"
                                                                runat="server" CommandArgument='<%# Eval("Rede_id") %>'
                                                                OnCommand="ExcluirRede"
                                                                ToolTip="Excluir Rede" ImageUrl="~/images/Icones/delete.png" />
                                                        </ItemTemplate>
                                                        <HeaderStyle Wrap="False" />
                                                        <ItemStyle Wrap="False" />
                                                    </asp:TemplateField>

                                                </Columns>

                                                <PagerStyle CssClass="pgr"></PagerStyle>

                                            </asp:GridView>

                                        </div>

                                    </div>


                                </fieldset>

                            </div>

                        </ContentTemplate>
                    </asp:UpdatePanel>

                </div>

                <div id="tabs-8">

                    <asp:UpdatePanel ID="UpdatePanelTabMEstacao" runat="server">
                        <ContentTemplate>

                            <div class="CadBox">
                                <fieldset class="fieldSetTools">
                                    <legend>Temporada</legend>

                                    <div class="CadBox_form">

                                        <div class="CadBox_formulario">

                                            <asp:TextBox ID="txtCodMEstacao" runat="server" Width="50px" Style="display: none;" ReadOnly="True" />

                                            <p class="paragrafo">
                                                <asp:Label ID="lblEstacaoNome" Text="Nome" runat="server" /><br />
                                                <asp:TextBox ID="txtNomeEstacao" runat="server" AutoPostBack="true" OnTextChanged="txtNomeEstacao_TextChanged" />
                                                <asp:Image ID="imgNomeEstacaoOk" runat="server" />
                                                <asp:RequiredFieldValidator ID="Rq" runat="server" ControlToValidate="txtNomeEstacao"
                                                    ErrorMessage="*" ToolTip="Campo Requerido"
                                                    ValidationGroup="SalvarMEstacao"></asp:RequiredFieldValidator>
                                            </p>

                                            <p class="paragrafo">
                                                <asp:Label ID="lblEstacaoTipo" Text="Estação/Pacote" runat="server" /><br />
                                                <asp:DropDownList ID="ddlTipoMercadoEstacao" runat="server">
                                                    <asp:ListItem Value="False" Selected="True" Text="Estação" />
                                                    <asp:ListItem Value="True" Text="Pacote" />
                                                </asp:DropDownList>

                                            </p>

                                            <p class="paragrafo">
                                                <asp:CheckBox ID="chkSeasonal" runat="server" Text="Seasonal?" />
                                            </p>

                                            <asp:Button ID="btnSalvarMEstacao" CssClass="btnGeralAzul" runat="server" Text="Salvar" ValidationGroup="SalvarMEstacao" OnClick="CadastrarMEstacao" />
                                            <asp:Button ID="btnAtualizarMEstacao" CssClass="btnGeralAzul" runat="server" Text="Atualizar" ValidationGroup="SalvarMEstacao" OnClick="AtualizarMEstacao" />
                                            <br />
                                            <asp:Label ID="lblMsgCadMEstacao" Font-Bold="True" Text="" runat="server" />


                                        </div>

                                        <div class="CadBox_grid">

                                            <asp:GridView ID="GridMercadoEstacao"
                                                GridLines="None" CssClass="mGrid" PagerStyle-CssClass="pgr"
                                                AlternatingRowStyle-CssClass="alt" runat="server"
                                                AutoGenerateColumns="False"
                                                Width="16px" PageSize="8">
                                                <AlternatingRowStyle CssClass="alt"></AlternatingRowStyle>

                                                <Columns>

                                                    <asp:BoundField DataField="S_mercado_estacao_id" HeaderText="ID" SortExpression="S_mercado_estacao_id" />

                                                    <asp:BoundField DataField="S_mercado_estacao_nome" HeaderText="Nome" SortExpression="S_mercado_estacao_nome">

                                                        <ItemStyle Wrap="False" />
                                                    </asp:BoundField>

                                                    <%--<asp:BoundField DataField="S_mercado_estacao_pacote" HeaderText="Pacote" SortExpression="S_mercado_estacao_pacote" />--%>

                                                    <asp:TemplateField HeaderText="Pacote">
                                                        <ItemTemplate>
                                                            <%# Convert.ToBoolean(Eval("S_mercado_estacao_pacote")) ? "Sim"  : "" %>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>

                                                    <asp:TemplateField HeaderText="Seasonal">
                                                        <ItemTemplate>
                                                            <%# Convert.ToBoolean(Eval("S_mercado_estacao_seasonal")) ? "Sim"  : "" %>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>

                                                    <%--<asp:CommandField ButtonType="Image" SelectImageUrl="~/images/Icones/edit.png" ShowSelectButton="True" />--%>

                                                    <asp:TemplateField>
                                                        <ItemTemplate>
                                                            <asp:ImageButton ID="EditarMEstacao"
                                                                runat="server" CommandArgument='<%# Eval("S_mercado_estacao_id") %>'
                                                                OnCommand="EditarMEstacao"
                                                                ToolTip="Editar Temporada" ImageUrl="~/images/Icones/edit.png" />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>

                                                    <asp:TemplateField HeaderText="">
                                                        <ItemTemplate>
                                                            <asp:ImageButton ID="ExcluirMEstacao"
                                                                runat="server" CommandArgument='<%# Eval("S_mercado_estacao_id") %>'
                                                                OnCommand="ExcluirMEstacao"
                                                                ToolTip="Excluir Mercado Estação" ImageUrl="~/images/Icones/delete.png" />
                                                        </ItemTemplate>
                                                        <HeaderStyle Wrap="False" />
                                                        <ItemStyle Wrap="False" />
                                                    </asp:TemplateField>

                                                </Columns>

                                                <PagerStyle CssClass="pgr"></PagerStyle>
                                            </asp:GridView>

                                        </div>

                                    </div>
                                </fieldset>
                            </div>

                        </ContentTemplate>
                    </asp:UpdatePanel>

                </div>

                <div id="tabs-9">

                    <asp:UpdatePanel ID="UpdatePanelTabMeal" runat="server">
                        <ContentTemplate>

                            <div class="CadBox">
                                <fieldset class="fieldSetTools">
                                    <legend>BreakFast</legend>

                                    <div class="CadBox_form">

                                        <div class="CadBox_formulario">

                                            <asp:TextBox ID="txtCodBreakFast" runat="server" Width="50px" Style="display: none;" ReadOnly="True" />

                                            <p class="paragrafo">
                                                <asp:Label ID="lblNomeMeal" Text="Nome" runat="server" /><br />
                                                <asp:TextBox ID="txtNomeMeal" runat="server" AutoPostBack="true" OnTextChanged="txtNomeMeal_TextChanged" />
                                                <asp:Image ID="imgNomeMealOk" runat="server" />
                                                <asp:RequiredFieldValidator ID="RqNomeMeal" runat="server" ControlToValidate="txtNomeMeal"
                                                    ErrorMessage="*" ToolTip="Campo Requerido"
                                                    ValidationGroup="SalvarMeal"></asp:RequiredFieldValidator>
                                            </p>



                                            <asp:Button ID="btnSalvarMeal" CssClass="btnGeralAzul" runat="server" Text="Salvar" ValidationGroup="SalvarMeal" OnClick="CadastrarMeal" />
                                            <asp:Button ID="btnAtualizarMeal" CssClass="btnGeralAzul" runat="server" Text="Atualizar" ValidationGroup="SalvarMeal" OnClick="AtualizarMeal" />
                                            <br />
                                            <asp:Label ID="lblMsgCadMeal" Font-Bold="True" runat="server" />

                                        </div>

                                        <div class="CadBox_grid">

                                            <asp:GridView ID="GridViewMeal"
                                                GridLines="None" CssClass="mGrid" PagerStyle-CssClass="pgr"
                                                AlternatingRowStyle-CssClass="alt" runat="server"
                                                AutoGenerateColumns="False"
                                                Width="16px" PageSize="8">
                                                <AlternatingRowStyle CssClass="alt"></AlternatingRowStyle>

                                                <Columns>

                                                    <asp:BoundField DataField="S_meal_id" HeaderText="ID" SortExpression="S_meal_id" />

                                                    <asp:BoundField DataField="S_meal_nome" HeaderText="Nome" SortExpression="S_meal_nome">

                                                        <ItemStyle Wrap="False" />
                                                    </asp:BoundField>

                                                    <asp:TemplateField>
                                                        <ItemTemplate>
                                                            <asp:ImageButton ID="EditarMeal"
                                                                runat="server" CommandArgument='<%# Eval("S_meal_id") %>'
                                                                OnCommand="EditarMeal"
                                                                ToolTip="Editar Meal" ImageUrl="~/images/Icones/edit.png" />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>

                                                    <asp:TemplateField HeaderText="">
                                                        <ItemTemplate>
                                                            <asp:ImageButton ID="ExcluirMeal"
                                                                runat="server" CommandArgument='<%# Eval("S_meal_id") %>'
                                                                OnCommand="ExcluirMeal"
                                                                ToolTip="Excluir MEal" ImageUrl="~/images/Icones/delete.png" />
                                                        </ItemTemplate>
                                                        <HeaderStyle Wrap="False" />
                                                        <ItemStyle Wrap="False" />
                                                    </asp:TemplateField>

                                                </Columns>

                                                <PagerStyle CssClass="pgr"></PagerStyle>
                                            </asp:GridView>

                                        </div>

                                    </div>

                                </fieldset>
                            </div>

                        </ContentTemplate>
                    </asp:UpdatePanel>

                </div>

                <div id="tabs-10">

                    <asp:UpdatePanel ID="UpdatePanelTabCategoria" runat="server">
                        <ContentTemplate>

                            <div class="CadBox">
                                <fieldset class="fieldSetTools">
                                    <legend>Categoria Apartamento</legend>

                                    <div class="CadBox_form">

                                        <div class="CadBox_formulario">

                                            <asp:TextBox ID="txtCodCategoria" runat="server" Width="50px" Style="display: none;" ReadOnly="True" />

                                            <p class="paragrafo">
                                                <asp:Label ID="lblNomeCategoria" Text="Nome" runat="server" /><br />
                                                <asp:TextBox ID="txtNomeCategoria" runat="server" AutoPostBack="true" OnTextChanged="txtNomeCategoria_TextChanged" />
                                                <asp:Image ID="imgNomeCategoriaOk" runat="server" />
                                                <asp:RequiredFieldValidator ID="RqNomeCategoria" runat="server"
                                                    ControlToValidate="txtNomeCategoria"
                                                    ErrorMessage="*" ToolTip="Campo Requerido"
                                                    ValidationGroup="SalvarCategoria"></asp:RequiredFieldValidator>
                                            </p>

                                            <asp:Button ID="btnSalvarCategoria" CssClass="btnGeralAzul" runat="server" Text="Salvar" ValidationGroup="SalvarCategoria" OnClick="CadastrarCategoria" />
                                            <asp:Button ID="btnAtualizarCategoria" CssClass="btnGeralAzul" runat="server" Text="Atualizar" ValidationGroup="SalvarCategoria" OnClick="AtualizarCategoria" />
                                            <br />
                                            <asp:Label ID="lblMsgCadCategoria" Font-Bold="True" runat="server" />

                                        </div>

                                        <div class="CadBox_grid">

                                            <asp:GridView ID="GridViewCategorias"
                                                GridLines="None" CssClass="mGrid" PagerStyle-CssClass="pgr"
                                                AlternatingRowStyle-CssClass="alt" runat="server"
                                                AutoGenerateColumns="False"
                                                Width="16px" PageSize="8">
                                                <AlternatingRowStyle CssClass="alt"></AlternatingRowStyle>

                                                <Columns>

                                                    <asp:BoundField DataField="Tarif_categoria_id" HeaderText="ID" SortExpression="Tarif_categoria_id" />
                                                    <asp:BoundField DataField="Tarif_categoria_nome" HeaderText="Nome" SortExpression="Tarif_categoria_nome">
                                                        <ItemStyle Wrap="False" />
                                                    </asp:BoundField>

                                                    <asp:TemplateField>
                                                        <ItemTemplate>
                                                            <asp:ImageButton ID="EditarCategoria"
                                                                runat="server" CommandArgument='<%# Eval("Tarif_categoria_id") %>'
                                                                OnCommand="EditarCategoria"
                                                                ToolTip="Editar Categoria" ImageUrl="~/images/Icones/edit.png" />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>

                                                    <asp:TemplateField HeaderText="">
                                                        <ItemTemplate>
                                                            <asp:ImageButton ID="ExcluirCategoria"
                                                                runat="server" CommandArgument='<%# Eval("Tarif_categoria_id") %>'
                                                                OnCommand="ExcluirCategoria"
                                                                ToolTip="Excluir Categoria" ImageUrl="~/images/Icones/delete.png" />
                                                        </ItemTemplate>
                                                        <HeaderStyle Wrap="False" />
                                                        <ItemStyle Wrap="False" />
                                                    </asp:TemplateField>

                                                </Columns>
                                                <PagerStyle CssClass="pgr"></PagerStyle>
                                            </asp:GridView>

                                        </div>

                                    </div>
                                </fieldset>
                            </div>

                        </ContentTemplate>
                    </asp:UpdatePanel>

                </div>

                <div id="tabs-11">

                    <asp:UpdatePanel ID="UpdatePanelTabCategEscrita" runat="server">
                        <ContentTemplate>

                            <div class="CadBox">
                                <fieldset class="fieldSetTools">
                                    <legend>Categoria Hotel</legend>

                                    <div class="CadBox_form">

                                        <div class="CadBox_formulario">

                                            <asp:TextBox ID="txtCodCategEscrita" runat="server" Width="50px" Style="display: none;" ReadOnly="True" />

                                            <p class="paragrafo">
                                                <asp:Label ID="lblNomeCategEscrita" Text="Nome" runat="server" /><br />
                                                <asp:TextBox ID="txtNomeCategEscrita" runat="server" AutoPostBack="true" OnTextChanged="txtNomeCategEscrita_TextChanged" />
                                                <asp:Image ID="imgNomeCategEscritaOk" runat="server" />
                                                <asp:RequiredFieldValidator ID="RqNomeCategEscrita" runat="server"
                                                    ControlToValidate="txtNomeCategEscrita"
                                                    ErrorMessage="*" ToolTip="Campo Requerido"
                                                    ValidationGroup="SalvarCategEscrita"></asp:RequiredFieldValidator>
                                            </p>



                                            <asp:Button ID="btnSalvarCategEscrita" CssClass="btnGeralAzul" runat="server" Text="Salvar" ValidationGroup="SalvarCategEscrita" OnClick="CadastrarCategEscrita" />
                                            <asp:Button ID="btnAtualizarCategEscrita" CssClass="btnGeralAzul" runat="server" Text="Atualizar" ValidationGroup="SalvarCategEscrita" OnClick="AtualizarCategEscrita" />
                                            <br />
                                            <asp:Label ID="lblMsgCadCategEscrita" Font-Bold="True" runat="server" />



                                        </div>

                                        <div class="CadBox_grid">


                                            <asp:GridView ID="GridViewCategEscrita"
                                                GridLines="None" CssClass="mGrid" PagerStyle-CssClass="pgr"
                                                AlternatingRowStyle-CssClass="alt" runat="server"
                                                AutoGenerateColumns="False"
                                                Width="158px" PageSize="8">
                                                <AlternatingRowStyle CssClass="alt"></AlternatingRowStyle>

                                                <Columns>

                                                    <asp:BoundField DataField="CategoriaEscrita_id" HeaderText="ID" SortExpression="CategoriaEscrita_id" />
                                                    <asp:BoundField DataField="CategoriaEscrita_nome" HeaderText="Nome" SortExpression="CategoriaEscrita_nome">

                                                        <ItemStyle Wrap="False" />
                                                    </asp:BoundField>

                                                    <asp:TemplateField>
                                                        <ItemTemplate>
                                                            <asp:ImageButton ID="EditarCategoriaEscrita"
                                                                runat="server" CommandArgument='<%# Eval("CategoriaEscrita_id") %>'
                                                                OnCommand="EditarCategoriaEscrita"
                                                                ToolTip="Editar Categoria Hotel" ImageUrl="~/images/Icones/edit.png" />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>

                                                    <asp:TemplateField HeaderText="">
                                                        <ItemTemplate>
                                                            <asp:ImageButton ID="ExcluirCategEscrita"
                                                                runat="server" CommandArgument='<%# Eval("CategoriaEscrita_id") %>'
                                                                OnCommand="ExcluirCategEscrita"
                                                                ToolTip="Excluir Categoria Hotel" ImageUrl="~/images/Icones/delete.png" />
                                                        </ItemTemplate>
                                                        <HeaderStyle Wrap="False" />
                                                        <ItemStyle Wrap="False" />
                                                    </asp:TemplateField>

                                                </Columns>
                                                <PagerStyle CssClass="pgr"></PagerStyle>
                                            </asp:GridView>


                                        </div>


                                    </div>

                                </fieldset>
                            </div>

                        </ContentTemplate>
                    </asp:UpdatePanel>

                </div>

                <div id="tabs-12">

                    <asp:UpdatePanel ID="UpdatePanelTabClassificacao" runat="server">
                        <ContentTemplate>

                            
                            <div class="CadBox">
                                <fieldset class="fieldSetTools">
                                    <legend>Classificação</legend>

                                    <div class="CadBox_form">

                                        <div class="CadRede_formulario">

                                            <asp:TextBox ID="txtCodClass" runat="server" Width="50px" Style="display: none;" ReadOnly="True" />

                                            <p class="paragrafo">
                                                <asp:Label ID="lblNomeClass" Text="Nome" runat="server" /><br />
                                                <asp:TextBox ID="txtNomeClass" runat="server" AutoPostBack="true" OnTextChanged="txtNomeClass_TextChanged" />
                                                <asp:Image ID="imgNomeClassOk" runat="server" />
                                                <asp:RequiredFieldValidator ID="RqNomeClass" runat="server"
                                                    ControlToValidate="txtNomeClass"
                                                    ErrorMessage="*" ToolTip="Campo Requerido"
                                                    ValidationGroup="SalvarClass"></asp:RequiredFieldValidator>
                                            </p>

                                            <p class="paragrafo">
                                                <asp:Label ID="lblImageClass" runat="server" Text="Imagem:" /><br />
                                                <asp:FileUpload ID="FileUploadCategoria" runat="server" Width="150px" /><br />
                                                <asp:Image ID="ImgCategoria" runat="server" />
                                            </p>



                                            <asp:Button ID="btnSalvarClass" CssClass="btnGeralAzul" runat="server" Text="Salvar" ValidationGroup="SalvarClass" OnClick="CadastrarClass" />
                                            <asp:Button ID="btnAtualizarClass" CssClass="btnGeralAzul" runat="server" Text="Atualizar" ValidationGroup="SalvarClass" OnClick="AtualizarClass" />
                                            <br />
                                            <asp:Label ID="lblMsgCadClass" Font-Bold="True" runat="server" />


                                        </div>

                                        <div class="CadBox_grid">

                                            <asp:GridView ID="GridClass" runat="server"
                                                AutoGenerateColumns="False" GridLines="None" CssClass="mGrid"
                                                Height="16px" PageSize="5">
                                                <AlternatingRowStyle CssClass="alt"></AlternatingRowStyle>

                                                <Columns>
                                                    <asp:BoundField DataField="Categ_id" HeaderText="ID" InsertVisible="False"
                                                        ReadOnly="True" SortExpression="Categ_id">
                                                        <FooterStyle CssClass="invisible" />
                                                        <HeaderStyle CssClass="invisible" />
                                                        <ItemStyle CssClass="invisible" />
                                                    </asp:BoundField>
                                                    <asp:BoundField DataField="Categ_classificacao" HeaderText="Calssificação"
                                                        SortExpression="Categ_classificacao">
                                                        <HeaderStyle Wrap="False" />
                                                    </asp:BoundField>
                                                    <asp:BoundField DataField="Categ_imgnome" HeaderText="Extenção"
                                                        SortExpression="Categ_imgnome" Visible="False" />
                                                    <asp:TemplateField HeaderText="Img">
                                                        <ItemTemplate>
                                                            <asp:Image ID="Image1" runat="server" Height="17px"
                                                                ImageUrl='<%# DataBinder.Eval(Container.DataItem,"Categ_imgnome", "~/ImgCategorias/{0}" ) %>' Width="89px" />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>

                                                    <asp:TemplateField>
                                                        <ItemTemplate>
                                                            <asp:ImageButton ID="EditarClass"
                                                                runat="server" CommandArgument='<%# Eval("Categ_id") %>'
                                                                OnCommand="EditarClass"
                                                                ToolTip="Editar Classificação" ImageUrl="~/images/Icones/edit.png" />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>

                                                    <asp:TemplateField HeaderText="">
                                                        <ItemTemplate>
                                                            <asp:ImageButton ID="ExcluirClass"
                                                                runat="server" CommandArgument='<%# Eval("Categ_id") %>'
                                                                OnCommand="ExcluirClass"
                                                                ToolTip="Excluir Classifiação" ImageUrl="~/images/Icones/delete.png" />
                                                        </ItemTemplate>
                                                        <HeaderStyle Wrap="False" />
                                                        <ItemStyle Wrap="False" />
                                                    </asp:TemplateField>

                                                </Columns>

                                                <PagerStyle CssClass="pgr"></PagerStyle>

                                            </asp:GridView>

                                        </div>

                                    </div>

                                </fieldset>

                            </div>

                        </ContentTemplate>
                        <Triggers>
                            <asp:AsyncPostBackTrigger ControlID="btnSalvarClass" EventName="Click" />
                        </Triggers>                        
                    </asp:UpdatePanel>

                </div>


                 <div id="tabs-13">

                   <asp:UpdatePanel ID="UpdatePanelTabs13" runat="server">
                        <ContentTemplate>

                            <div class="CadBox">
                                <fieldset class="fieldSetTools">
                                    <legend>Amenities</legend>

                                    <div class="CadBox_form">

                                        <div class="CadRede_formulario">

                                            <asp:TextBox ID="txtAmenityID" runat="server" Width="50px" Style="display: none;" ReadOnly="True" />

                                            <p class="paragrafo">
                                                <asp:Label ID="Label1" Text="Nome" runat="server" /><br />
                                                <asp:TextBox ID="txtNomeAmenities" runat="server" />
                                            </p>

                                            <p class="paragrafo">
                                                <asp:Label ID="Label4" Text="Grupo" runat="server" /><br />
                                                <asp:DropDownList runat="server" ID="ddlGrupos"></asp:DropDownList>
                                            </p>

                                            <p class="paragrafo">
                                                <asp:Label ID="Label2" runat="server" Text="Imagem:" /><br />
                                                <asp:FileUpload ID="fupImagemAmenities" runat="server" Width="150px" /><br />
                                                <asp:Image ID="imgAmenity" runat="server" />
                                            </p>

                                            <asp:Button ID="btnSalvarAmenity" CssClass="btnGeralAzul" runat="server" Text="Salvar" OnClick="btnSalvarAmenity_Click" />
                                            <asp:Button ID="btnAtualizarAmenity" CssClass="btnGeralAzul" runat="server" Text="Atualizar" OnClick="btnAtualizarAmenity_Click" />
                                            <br />
                                            <asp:Label ID="Label3" Font-Bold="True" runat="server" />


                                        </div>

                                        <div class="CadBox_grid">

                                            <asp:GridView ID="grdAmenities" runat="server"
                                                AutoGenerateColumns="False" GridLines="None" CssClass="mGrid"
                                                Height="16px" PageSize="5">
                                                <AlternatingRowStyle CssClass="alt"></AlternatingRowStyle>

                                                <Columns>
                                                    <asp:BoundField DataField="S_Amenities_id" HeaderText="ID" InsertVisible="False"
                                                        ReadOnly="True" SortExpression="S_Amenities_id">
                                                        <FooterStyle CssClass="invisible" />
                                                        <HeaderStyle CssClass="invisible" />
                                                        <ItemStyle CssClass="invisible" />
                                                    </asp:BoundField>
                                                    <asp:BoundField DataField="S_Amenities_nome" HeaderText="Nome"
                                                        SortExpression="S_Amenities_nome">
                                                        <HeaderStyle Wrap="False" />
                                                    </asp:BoundField>
                                                    <asp:BoundField DataField="Group" HeaderText="Grupo"
                                                        SortExpression="Group">
                                                        <HeaderStyle Wrap="False" />
                                                    </asp:BoundField>
                                                    <asp:BoundField DataField="S_Amenities_imgNome" HeaderText="Img"
                                                        SortExpression="S_Amenities_imgNome" Visible="False" />
                                                    <asp:TemplateField HeaderText="Img">
                                                        <ItemTemplate>
                                                            <asp:Image ID="Image1" runat="server"
                                                                ImageUrl='<%# DataBinder.Eval(Container.DataItem,"S_Amenities_imgNome", "~/iconsAmenities/{0}" ) %>' Width="30px" />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField>
                                                        <ItemTemplate>
                                                            <asp:ImageButton ID="EditarAmenity"
                                                                runat="server" CommandArgument='<%# Eval("S_Amenities_id") %>'
                                                                OnCommand="EditarAmenity"
                                                                ToolTip="Editar Amenity" ImageUrl="~/images/Icones/edit.png" />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="">
                                                        <ItemTemplate>
                                                            <asp:ImageButton ID="ExcluirAmenity"
                                                                runat="server" CommandArgument='<%# Eval("S_Amenities_id") %>' OnCommand="ExcluirAmenity"
                                                                ToolTip="Excluir Amenity" ImageUrl="~/images/Icones/delete.png" />
                                                        </ItemTemplate>
                                                        <HeaderStyle Wrap="False" />
                                                        <ItemStyle Wrap="False" />
                                                    </asp:TemplateField>
                                                </Columns>
                                                <PagerStyle CssClass="pgr"></PagerStyle>
                                            </asp:GridView>
                                        </div>
                                    </div>
                                </fieldset>
                            </div>
                        </ContentTemplate>
                        <Triggers>
                            <asp:PostBackTrigger ControlID="btnSalvarAmenity" />
                            <asp:PostBackTrigger ControlID="btnAtualizarAmenity" />
                        </Triggers>
                    </asp:UpdatePanel>

                     </div>

            </div>

        </div>
    </form>
</body>
</html>
